<?php
// 本类由系统自动生成，仅供测试用途
class adminFrameAction extends Action {
	
	public function frameMenu(){
		
		if(!isset($_SESSION[C('USER_AUTH_KEY')])) {
			$this->display();
		}
	}
	
	public function frameApply(){
		if(!isset($_SESSION[C('USER_AUTH_KEY')])) {
			$Dao = M("menu");
       // echo $account;
        $list = $Dao->where("UPERMENUID = '0'")->select();
        $this->assign('list',$list);
			$this->display();
		}
	}
	
	public function frameTop(){
		if(!isset($_SESSION[C('USER_AUTH_KEY')])) {
			$this->display();
		}
	}
	
	public function admin(){
		if(!isset($_SESSION[C('USER_AUTH_KEY')])) {
			$this->display();
		}
	}
	
	public function addnewMenu(){
			$this->display();
	}
	
	public function addLeveltwonewMenu(){
		
			
		$tmp=$_GET['menuid'];
		
		
		$this->assign('parentID',$tmp);
		
		$this->display();
	}
	
	public function frameApplySecond(){
		$Dao = M("menu");
       // echo $account;
        $list = $Dao->where("UPERMENUID = '0'")->select();
        $this->assign('list',$list);
			$this->display();
	}
	
	public function frameApplyThird(){
		$Dao = M("menu");
       // echo $account;
        $list = $Dao->where("UPERMENUID = '0'")->select();
        $this->assign('list',$list);
			$this->display();
	}
	
	
	public function frameEmpty(){
		$ip = get_client_ip();

		 $this->assign('ip',$ip);
			$this->display();
	}
	
	public function menuEdit(){
		
			$id=$_GET["id"];
			
			$Dao = M("menu_content");
			
			$current=$Dao->where("MENU_ID=$id")->find();
			
			
			if(!$current){
				$Dao->MENU_ID=$id;
				$Dao->add();
				$current=$Dao->where("MENU_ID=$id")->find();
			}
			 $this->assign('current',$current);
			$this->display();
	}
}